package com.egg.mall.service.category;

import com.egg.common.mybatis.service.IBaseService;
import com.egg.mall.entity.category.Category;
import com.egg.mall.model.request.CategoryPostOrPut;
import com.egg.mall.model.response.web.CategoryTree;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Optional;


/**
 * @author east
 * @since 2022-08-08
 */
public interface ICategoryService extends IBaseService<Category> {


    List<CategoryTree> tree();

    List<CategoryTree> tree(Optional<Serializable> pid);

    Long add(CategoryPostOrPut param);

    Long edit(Serializable id, CategoryPostOrPut param);

    List<Category> findAllSubById(Collection<? extends Serializable> id);

    List<Category> findAllSubAndCurrentById(Collection<? extends Serializable> ids);

    void delCategory(Collection<? extends Serializable> ids);


}
